<#import "function.ftl" as func>
<#assign package=model.variables.package>
<#assign class=model.variables.class>
<#assign classVar=model.variables.classVar>
<#assign comment=model.tabComment>
<#assign system=vars.system>
<#assign domain=vars.domain>
<#assign sub=model.sub>
<#assign foreignKey=func.convertUnderLine(model.foreignKey)>
<#assign pkType=func.getPkType(model)>
<#assign fkType=func.getFkType(model)>
package ${domain}.${system}.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Page;
import org.springframework.data.repository.NoRepositoryBean;

import ${domain}.${system}.entity.${class};



import java.util.List;
import java.util.Map;


/**
* @Description ${comment} 数据访问接口
* @date ${date?string("yyyy-MM-dd HH:mm:ss")}
*/

@NoRepositoryBean
public interface BaseDao<T> extends JpaRepository<T,String>, JpaSpecificationExecutor<T> {


        /**
        * sql查询
        *
        * @param sql
        * @param args
        * @return
        */
        List<Map> findAllByParams(String sql, Object... args);

            /**
            * sql分页查询
            *
            * @param sql
            * @param args
            * @return
            */
            Page<Map> findPageByParams(String sql, Pageable pageable, Object... args);
}